package com.kordar.admin.modular.sys.entity;

import com.kordar.admin.kernel.annotation.CompareDouble;
import com.kordar.admin.kernel.annotation.Unique;
import com.kordar.admin.modular.sys.service.AdminService;
import lombok.Data;

import javax.validation.constraints.Size;

@Data
@CompareDouble(value1 = "newPassword", value2 = "repeatPassword")
public class ResetPasswordForm {
    @Size(min = 6, max = 24, message = "密码格式不正确")
    @Unique(field = "password", message = "老密码不正确", classz = AdminService.class)
    private String oldPassword;
    @Size(min = 6, max = 24, message = "密码格式不正确")
    private String newPassword;
    @Size(min = 6, max = 24, message = "密码格式不正确")
    private String repeatPassword;
}
